<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app"></div>
<script src="../JavaScript/vue.js"></script>
<script>
    /*
    * Vue.component( id, [definition] )
        参数：
            {string} id
            {Function | Object} [definition]
        用法：
            注册或获取全局组件。注册还会自动使用给定的 id 设置组件的名称
    * */
    Vue.component("School",{
        template:`
        <div class="schoolBox">
            <h1>学校名字：{{schoolName}}</h1>
            <h1>学校地址：{{schoolAddress}}</h1>
        </div>
        `,
        data(){
            return{schoolName:"尚硅谷", schoolAddress:"北京",}
        }
    })
    const vm=new Vue({
        el:"#app",
        template:`
        <div class="app">
         <School></School>
         </div>
        `


    })
</script>
</body>
</html>
